Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.Access

Imports System.Xml
Imports System.IO
Imports System.Xml.Serialization

Public Interface IAccessTransformerProvider

    Function getTranformers() As List(Of BaseAccessObjectTransformer)
    Function getObjectList() As List(Of String)

End Interface

Public MustInherit Class BaseTransformerProvider
    Implements IAccessTransformerProvider

    Private _ObjectList As List(Of String)

    Public Function getObjectList() As System.Collections.Generic.List(Of String) Implements IAccessTransformerProvider.getObjectList
        Return _ObjectList
    End Function

    Public MustOverride Function getTranformers() As  _
            System.Collections.Generic.List(Of BaseAccessObjectTransformer) _
                Implements IAccessTransformerProvider.getTranformers

    Protected Sub addObjectName(ByVal objName As String)

        If Me._ObjectList Is Nothing Then
            Me._ObjectList = New List(Of String)
        End If

        Me._ObjectList.Add(objName)

    End Sub

End Class

Public Class ADPTransformerProvider
    Inherits BaseTransformerProvider
    Implements IAccessTransformerProvider

    Public Overrides Function getTranformers() As List(Of BaseAccessObjectTransformer) 

        Dim transformers As New List(Of BaseAccessObjectTransformer)
        transformers.Add(New AccessVBARefTransformer)
        transformers.Add(New AccessModuleTransformer)
        transformers.Add(New AccessDataPageTransformer)
        transformers.Add(New AccessFormTransformer)
        transformers.Add(New AccessReportTransformer)
        transformers.Add(New AccessMacroTransformer)

        Return transformers

    End Function

End Class

Public Class MDBTransformerProvider
    Inherits BaseTransformerProvider
    Implements IAccessTransformerProvider

    Public Overrides Function getTranformers() As List(Of BaseAccessObjectTransformer)

        Dim transformers As New List(Of BaseAccessObjectTransformer)
        transformers.Add(New AccessVBARefTransformer)
        transformers.Add(New AccessModuleTransformer)
        transformers.Add(New AccessFormTransformer)
        transformers.Add(New AccessReportTransformer)
        transformers.Add(New AccessMacroTransformer)
        transformers.Add(New AccessQueryTransformer)
        transformers.Add(New AccessDataPageTransformer)
        Return transformers

    End Function

End Class

